package com.tabjin.rfidsocket.pojo.dto;

import com.google.common.collect.Lists;
import com.tabjin.rfidsocket.pojo.SysAclModule;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * @author tabjin
 * create at 2020/12/24 15:50
 * @program rfid_socket
 * @description
 */
@Getter
@Setter
@ToString
public class AclModuleLevelDTO extends SysAclModule {
    private List<AclModuleLevelDTO> aclModuleLevelDTOList = Lists.newArrayList();

    /**
     * 权限列表
     */
    private List<AclDTO> aclDTOList = Lists.newArrayList();

    public static AclModuleLevelDTO adapt(SysAclModule sysAclModule) {
        AclModuleLevelDTO dto = new AclModuleLevelDTO();
        BeanUtils.copyProperties(sysAclModule, dto);
        return dto;
    }
}
